package org.nanfang.test00.demo05.t02;

import java.util.concurrent.Callable;

/**
 * @author ZQX
 * @date 2025-03-12
 */
public class MyCallable implements Callable<Integer> {
    private int m;
    private int n;

    public MyCallable() {
    }

    public MyCallable(int m, int n) {
        this.m = m;
        this.n = n;
    }

    @Override
    public Integer call() throws Exception {
        int sum = 0;

        for (int i = m; i <= n; i++) {
            sum += i;
        }

        return sum;
    }
}
